<?php
FLEA::loadClass('ControllerBase');
class Controller_Default extends ControllerBase {
    // 复写 _forward 函数，返回控制器的结果
    function _forward($controllerName = null, $actionName = null) {
        $this->_dispatcher->setControllerName($controllerName);
        $this->_dispatcher->setActionName($actionName);
        return $this->_dispatcher->dispatching();
    }
    public $theme = Null;
    // 构造函数
    function Controller_Default($controllerName) {
        parent::__construct($controllerName);
        $this->theme = FLEA::getSingleton('Module_Theme_Main');
    }
    function actionIndex() {
        $this->theme->update();
        $Module = FLEA::getSingleton('Module_Node_Main');
        $Module->view($_GET['node']);
        $this->theme->theme(array('Module_Node_Main', 'nodeView'));
    }
}
